package com.hulk.rpc.serialize.impl.json;

import io.netty.buffer.ByteBuf;

import java.io.IOException;

public interface JsonMapper {

  /**
   * 读取对象
   */
  <T> T read(ByteBuf buffer, Class<T> type) throws IOException;

  /**
   * 写入对象
   */
  void write(ByteBuf buffer, Object value) throws IOException;

}
